﻿/* Copyright 2011 Michiel Fortuin
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * */

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Security.AccessControl;
using System.Text;
using sharplog;

namespace TestConsoleApplication
{
	class Program
	{
		static void Main(string[] args)
		{
			Log.Instance =
				new Log(new Destination(new SenderStream(new FileStream("test.log", FileMode.Append)),			new TextFormater("TestApp")),
						new Destination(new SenderStream(Console.OpenStandardOutput()),							new TextFormater("TestApp")),
				        new Destination(new SenderUdp(new IPEndPoint(IPAddress.Parse("192.168.250.2"), 516)),	new Syslog("TestApp")),
				        new Destination(new WinEventsLogSender("TestApp"),										new WinEventsLogFormater()));

			Log.SendMessage(Level.Warning, Facility.Local0, "123456", "You're a idiot.");
			Log.SendMessage(Level.Warning, Facility.Local0, "123456", "Yeah I know. You too");
			Console.ReadKey();
		}
	}
}
